/**
 * 
 */
package org.wicket.jbpm.engine.handlers;

import org.jbpm.graph.exe.ExecutionContext;
import org.springframework.beans.factory.BeanFactory;
import org.wicket.jbpm.engine.spring.JbpmCoreEngine;

/**
 * @author Emmanuel Nollase - emanux 
 * created: Jun 11, 2009 - 2:47:46 PM
 */
public class TimerAction extends SpringActionHandler
{

    private JbpmCoreEngine jbpmEngine;

    /*
     * (non-Javadoc)
     * 
     * @see
     * org.jbpm.graph.def.ActionHandler#execute(org.jbpm.graph.exe.ExecutionContext
     * )
     */
    public void execute(ExecutionContext context) throws Exception
    {

	jbpmEngine.endTimerTask(context);
    }

    @Override
    protected void initialiseHandler(BeanFactory factory)
    {
	jbpmEngine = (JbpmCoreEngine) factory.getBean("wf_core_engine");
    }

}
